package basedemo

import groovy.transform.Canonical

@Canonical
class Father {
    String name
    //对象在使用的时候才会创建
    @Lazy LazyChildren children=new LazyChildren()
    Person person=new Person()  //构造器会直接执行
    Father() {
        println "new 一个father"
    }
    static void main(String[] args) {
        def father = new Father()
        println "new 完了"
        println father.children
    }

}
